package interview.huawei.tjt.training.huaweijishitiku;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

// 统计每个月兔子的总数
public class HJ37 {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while((line = br.readLine()) != null) {
            int n = Integer.parseInt(line);
            int cnt = 1;
            int k1 = 0;
            int k2 = 0;
            for(int i = 0; i < n; i++) {
                cnt += k2;
                k2 = k1;
                k1 = cnt;
            }
            System.out.println(cnt);
        }
    }

}
